package com.itheima.admin.dto;

import com.itheima.admin.pojo.Module;
import com.itheima.admin.pojo.Role;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ModuleDto {
    private String name;
    private String parentName;
    private String ctype;
    private String state;
    private String curl;
    private String remark;

    public Module toModule(){
        Module module = new Module();
        BeanUtils.copyProperties(this,module);
        return module;
    }
}
